/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = frcmd_parse.h                                      */
/*  NOTE      = ����ͻ���                                          */
/*  DATE      = 2014/12/05                                         */
/*******************************************************************/

#ifndef __FRCMD_PARSE_H_
#define __FRCMD_PARSE_H_

#define CMD_ACTION_COMMIT    1
#define CMD_ACTION_ROLLBACK  2

#define OBJECT_L7               1
#define OBJECT_L7_DEFAULT       2
#define OBJECT_FILTER           3
#define OBJECT_JAVA             4
#define OBJECT_MODULE           5
#define OBJECT_LUA              6
#define OBJECT_SSL              7

char* contact_ipport(char *ip, char *port);
int l7_add(char *ip_proto, char *ip_addr, char *port, int l7_proto);
int l7_del(char *ip_proto, char *ip_addr, char *port);
int l7_default_add(char *ip_proto, int l7_proto);
int l7_default_del(char *ip_proto);
int l7_default_clear(void);
int l7_clear();
int filter_add(int i_accept, char *macaddr, char* ip_proto, char *src_iprange_portrange, char *dst_iprange_portrange);
int filter_del(char *macaddr, char* ip_proto, char *src_iprange_portrange, char *dst_iprange_portrange);
int filter_clear();
int java_setup(char *ip_proto, char *ip_addr, int port);
int report(char *type, char *action);
int commit(int obj_type);
int rollback(int obj_type);
int export_pcap(char *ip_proto, char *ipaddr, int port);
int print_system();
int print_memory();
int print_ct(char *l7_proto);
int print_topology();
int print_task();
int print_module(char *p_name);
int print_server();
int print_filter();
int print_java();
int print_l7();
int print_version();
int print_share_memory();
void print_help();
void server_exit(void);
void server_clear_all(void);

int module_add(char *p_path);
int module_del(char *p_path);
int module_clear(void);

int lua_add(char * p_ip, char *p_port, char *p_lua_filename);
int lua_del(char * p_ip, char *p_port);
int lua_clear(void);

int ssl_add(char * p_ip, int i_port, char *p_cert, char *p_passwd, char *p_domain);
int ssl_del(char * p_ip, int i_port, char *p_domain);

int module_download_upload(int i_proto, char *p_zip_filename);
int module_download_remove(int i_proto);
int module_download_add(int i_proto);
int module_download_del(int i_proto);
int module_download_clear(void);
int export(char *p_ip, int i_time, char *p_filename);

#endif
